<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let xhr = new XMLHttpRequest();
        let url = 'http://jsonplaceholder.typicode.com/posts?_limit=${10}&_page=${1}';
        xhr.open('GET', url);
        xhr.send();
        xhr.addEventListener('readystatechange', function() {
            if (xhr.readyState == 4) {
                if (xhr.status == 200) {
                    let data = JSON.parse(xhr.responseText);

                    console.log(data);
                    render(data)
                }
            }
        });


        function render(data) {
            let div = document.createElement('div');
            data.forEach(function(ele) {
                div.innerHTML += `
                <div>${ele.id}</div>
                <div>${ele.title}</div>
                ---------------------
                <div>${ele.body}</div>
                `
            });
            document.body.appendChild(div)
        }
    </script>
</body>

</html>